// reverse of a number

# include <iostream.h>
# include <conio.h>

class Reverser {
  int number;
public:
  void getNumber();
  void printReverse();
};

void Reverser::getNumber() {
  cout << "Enter the number to reverse: ";
  cin >> number;
}

void Reverser::printReverse() {
  while(number) {
    cout << number%10;
    number /= 10;
  }
}

void main() {
  clrscr();
  Reverser myReverser;
  myReverser.getNumber();
  myReverser.printReverse();
  getch();
}